<template>
<div class="app">
  <Header/>
  <!--nav-->
  <div class="navigate">
    <!--字符串和名字写法-->
    <RouterLink to="/home" class="active">首页</RouterLink>
    <RouterLink :to="{name:'xinwen'}">新闻</RouterLink>
    <RouterLink :to="{path:'/about'}">关于</RouterLink>
  </div>
  <!--展示区-->
  <div class="main-content">
    后期展示组件
    <router-view></router-view>
  </div>
</div>



</template>

<script lang="ts" setup name="App">
import {reactive,ref,onMounted} from "vue";
import {RouterView,RouterLink} from "vue-router";
// import{type Persons} from "@/type";
import Header from "@/components/Header.vue";



</script>

<style scoped>

.app{
  background-color: #ddd;
  box-shadow: 0 0 10px;
  border-radius: 10px;
  padding: 20px;
}
.navigate{
  display: flex;
  justify-content: space-around;
  margin: 0 100px;
}
.navigate a{
  display: block;
  text-align: center;
  width: 90px;
  height: 40px;
  line-height: 40px;
  border-radius: 10px;
  background-color: grey;
  text-decoration: none;
  color: white;
  font-size: 18px;
  letter-spacing: 5px;
}
.navigate router-link{
  background-color: #64967E;
  color: #ffc268;
  font-weight: 900;
  text-shadow: 0 0 1px black;
  font-family: 微软雅黑;
}
.main-content{
  margin: 0 auto;
  margin-top: 30px;
  border-radius: 10px;
  width: 90%;
  height: 400px;
  border: 1px solid;
}
</style>